/**
 * 
 */
package co.fitstart.data.service;

import java.util.List;

import com.demo2do.core.persistence.support.Filter;
import com.demo2do.core.persistence.support.Order;
import com.demo2do.core.persistence.support.QueryBuilder;
import com.demo2do.core.service.GenericService;
import com.demo2do.core.support.Page;

/**
 * @author Wilson
 *
 * @param <T>
 */
public interface DataService<T> extends GenericService<T> {
    
    /**
     * @param clazz
     * @return
     */
    public int count(Class<T> clazz);

    /**
     * @param clazz
     * @param filter
     * @return
     */
    public int count(Class<T> clazz, Filter filter);

    /**
     * 
     * @param clazz
     * @return
     */
    public List<T> listAll(Class<T> clazz);

    /**
     * 
     * @param clazz
     * @param page
     * @return
     */
    public List<T> listByPage(Class<T> clazz, Page page);
    
    /**
     * 
     * @param clazz
     * @param order
     * @param page
     * @return
     */
    public List<T> listByPage(Class<T> clazz, Order order, Page page);

    /**
     * @param clazz
     * @param queryBuilder
     * @param page
     * @return
     */
    public List<T> search(Class<T> clazz, QueryBuilder queryBuilder, Page page);
    
}
